<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

class CreateTreatmentCategoriesTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('treatment_categories', function (Blueprint $table) {
            $table->bigIncrements('id')->unique()->comment('主键ID');
            $table->string('name')->unique()->comment('疗程所属分类名');
            $table->string('image_url')->comment('疗程所属分类图片地址');
        });

        DB::statement("ALTER TABLE `treatment_categories` comment '疗程分类表'");
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('treatment_categories');
    }
}
